<?php get_header(); ?>
	<div id="postlist">
	<?php if (have_posts()) : 
		$post = $posts[0]; // Hack. Set $post so that the_date() works.
		if(is_category()){
			echo '<h3 class="archivetitle">类别存档: '.single_cat_title('',FALSE).'</h3>';
		}elseif(is_day()){
			echo '<h3 class="archivetitle">日期存档：'.get_the_time('Y-m-d').'</h3>';
		}elseif(is_month()){
			echo '<h3 class="archivetitle">月度存档：'.get_the_time('Y-m').'</h3>';
		}elseif(is_year()){
			echo '<h3 class="archivetitle">年度存档：'.get_the_time('Y').'</h3>';
		} elseif(is_search()){
			echo '<h3 class="archivetitle">搜索结果</h3>';
		}elseif(is_author()){
			echo '<h3 class="archivetitle">作者存档</h3>';
		}elseif(isset($_GET['paged']) && !empty($_GET['paged'])){ // If this is a paged archive
			echo '<h3 class="archivetitle">博客存档</h3>';
		}elseif(is_tag()){
			echo '<h3 class="archivetitle">标签存档：'.single_tag_title('',FALSE).'</h3>';
		}
		while (have_posts()) : the_post(); ?>
			<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
				<div class="posttitle">
				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'yunjietheme'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
				<div class="posttime">
					<?php the_time(__('F jS, Y', 'yunjietheme')) ?>
					<span class="views"><?php if (function_exists('the_views')) the_views(); ?></span>
				</div>
				</div>
				<div class="fixed"></div>

				<div class="entry">
					<?php the_content(__('Read the rest of this entry &raquo;', 'yunjietheme')); ?>
				</div>
				<div class="postmeta">
					<span class="category"><?php printf(__('%s', 'yunjietheme'), get_the_category_list(', ')); ?></span>
					<?php the_tags(__('<span class="tags">', 'yunjietheme'), ', ', '</span>&nbsp;'); ?>
 				  <span class="bubble"><?php comments_popup_link(__('No Comments', 'yunjietheme'), __('1 Comment', 'yunjietheme'), __('% Comments', 'yunjietheme'), '', __('Comments Closed', 'yunjietheme') ); ?></span>
					<?php edit_post_link(__('Edit', 'yunjietheme'), '', ' | '); ?>
				</div>
			</div>

		<?php endwhile; ?>

		<div id="pagenavi">
			<?php if(function_exists('wp_pagenavi')):?>
				<?php wp_pagenavi(); ?>
			<?php else:?>
				<div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries', 'yunjietheme')) ?></div>
				<div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;', 'yunjietheme')) ?></div>
			<?php endif;?>
			<div class="fixed"></div>
		</div>

	<?php else : ?>

		<h2 class="center"><?php _e('Not Found', 'yunjietheme'); ?></h2>
		<p class="center"><?php _e('Sorry, but you are looking for something that isn&#8217;t here.', 'yunjietheme'); ?></p>
		<?php get_search_form(); ?>

	<?php endif; ?>

	</div><!--postlist ended-->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
 